package com.unittec.zk.sdk.root.enums;

/**
 * 需求计划类型
 */
public enum PlanTypeEnum {

    Empty_BOX_APPLY_PLAN("1", "空箱申请计划"), DELIVERY_PLAN("2", "送箱发运计划"), EMPTY_DELIVERY_PLAN("3", "提空发运计划"),
    SUITCASE_RESERVATION_PLAN("4", "提箱预约计划"), TRAIN_ARRIVAL("5", "列车到达"), WAYBILL("6", "随车运单"),
    EMPTY_COMBINED_TRANSPORT("7", "空空联运"), TRAIN_START("8", "列车发车");

    private final String key;
    private final String value;

    PlanTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return this.key;
    }

    public String getValue() {
        return this.value;
    }

    public static PlanTypeEnum convertLevel(String key) {
        PlanTypeEnum[] list = values();
        for (PlanTypeEnum planType : list) {
            if (planType.getKey().equals(key)) {
                return planType;
            }
        }
        return null;
    }
}
